<style>
.mix {padding:0px 5px;}
</style>

		<div class="ui-portlet">
			{{template wxes/_user_wxes}}
			<ol class="breadcrumb">
			  <li><a href="/users/index"><i class="fa fa-home"></i>&nbsp;&nbsp;个人中心</a></li>
			  <li class="active">服务门店列表</li>
			</ol>
		</div>
       <hr>
       <div class="mb10">
       
       	<a class="btn btn-primary" href="{{$this->Html->url(array('action'=>'add'))}}">新增服务门店</a>
       	<a class="btn btn-primary" href="{{$this->Html->url('/user_cates/mine?model=WxStorefront')}}">门店分类</a>
       	<a class="btn btn-primary" href="{{Router::url('/wx_cities/mine')}}">服务城市</a>
       	<a class="btn btn-primary" href="{{$this->Html->url('/wx_city_cates/mine?model=WxStorefront')}}">城市门店分类</a>
       </div>
       <br/>
       <div>
       		<div class="pull-right">
				<select id="user-cates-list" class="form-control">
					<option  {{if !$_REQUEST['cate_id']}} selected {{/if}} value="">{{__('All Categories')}}</option>
					{{loop $cates $cate_id $cate_name}}
						<option  {{if $cate_id==$_REQUEST['cate_id']}} selected {{/if}} value="{{$cate_id}}">{{$cate_name}}</option>
					{{/loop}}
				</select>
			</div>
			<script>
			$(function(){
				var url = "{{getSearchLinks($this->request,array(),array('cate_id'))}}";
				$('#user-cates-list').change(function(){
					if(url.indexOf('?') >= 0){
						window.location.href = url+"&cate_id=" + this.value;
					}
					else{
						window.location.href = url+"?cate_id=" + this.value;
					}					
				})
			})
			</script>

	       <ul class="nav nav-tabs" role="tablist">
	       	<li {{if !$_REQUEST['city_id']}}class="active"{{/if}}><a href="{{getSearchLinks($this->request,array(),array('city_id'))}}">{{__('All Cities')}}</a></li>
	       	{{loop $cities $id $name}}
	       		{{if !empty($id)}}
	       			<li {{if $_REQUEST['city_id']==$id}}class="active"{{/if}}><a href="{{getSearchLinks($this->request,array('city_id'=>$id),array('city_id'))}}">{{$name}}</a></li>
	       		{{/if}}
	       	{{/loop}}
	       </ul>
       </div>
       
       <div class="ui-portlet">
	       <div class="row clearfix ui-portlet-list" id="storefront-list">
	       {{loop $datalist $item}}
	       	<div class="col-md-4 mix">
	       		<div class="appmsg">
		       		<div class="appmsg_content">
		       		<h4><a href="{{$this->Html->url('/wx_storefronts/view/'.$item['WxStorefront']['id'])}}" target="_blank">{{$item['WxStorefront']['name']}}</a></h4>
		       		<p>{{$item['WxStorefront']['subtitle']}}</p>
		       		<div class="cover">{{$this->Html->image($item['WxStorefront']['coverimg'])}}</div>
		       		<p class="appmsg_desc">
		       			{{$item['WxStorefront']['address']}}<br/>
		       			{{$item['WxStorefront']['telephone']}}<br/>
		       			{{$item['WxStorefront']['business_hours']}}
		       		</p>
		       		</div>
		       		<div class="appmsg_opr clearfix">
		       			{{$this->Html->link('<i data-toggle="tooltip" data-placement="top" title="'.__('Edit').'" class="fa fa-edit"></i>', array('controller'=>'wx_storefronts','action' => 'edit', $item['WxStorefront']['id']),array('class'=>'col-xs-6 opr-edit','escape'=>false))}}
		       			<a href="javascript:void(0)" data-url="{{$this->Html->url('/wx_storefronts/delete/'.$item['WxStorefront']['id'])}}" class="col-xs-6 delete-pop" data-container="body" data-content="确定删除此素材？"><i data-toggle="tooltip" data-placement="top" 
		       			 title="{{__('Delete')}}" class="fa fa-trash"></i></a>
		       			 
		       			 <!-- {{$this->Html->link('', array('controller'=>'wx_msgs','action' => 'delete', $item['WxStorefront']['id']),array('class'=>'col-xs-6','escape'=>false))}}
		       			  -->
		       		</div>
	       		</div>
	       	</div>
	  		{{/loop}}
	    	</div>
	    	<div>{{$page_navi}}</div>
    	</div>